
  ___  ____  ____  ____  ____ (R)
 /__    /   ____/   /   ____/
___/   /   /___/   /   /___/   15.1   Copyright 1985-2017 StataCorp LLC
  Statistics/Data Analysis            StataCorp
                                      4905 Lakeway Drive
     MP - Parallel Edition            College Station, Texas 77845 USA
                                      800-STATA-PC        http://www.stata.com
                                      979-696-4600        stata@stata.com
                                      979-696-4601 (fax)

32-user 64-core Stata network perpetual license:
       Serial number:  501506200495
         Licensed to:  Harvard-MIT Data Center
                       Cambridge, MA

Notes:
      1.  Stata is running in batch mode.
      2.  Unicode is supported; see help unicode_advice.
      3.  More than 2 billion observations are allowed; see help obs_advice.
      4.  Maximum number of variables is set to 5000; see help set_maxvar.

. do "dofiles/16_Table_A12.do" 

. /****************************************************************************
> *****************************
> Replication Files for Housing Discrimination and the Toxics Exposure Gap in t
> he United States: 
> Evidence from the Rental Market  by Peter Christensen, Ignacio Sarmiento-Barb
> ieri and Christopher Timmins
> *****************************************************************************
> ****************************/
. 
. clear all

. set matsize 11000

. 
. use "../stores/toxic_discrimination_data.dta"

. 
. 
. keep if sample==1
(801 observations deleted)

. 
. loc quartiles 4

. set seed 1010101

. 
. *****************************************************************************
> *******************
. * Prep data
. *****************************************************************************
> *******************
. 
. gen male=(gender==2)

. gen female=(gender==1)

. 
. 
. 
. 
. forvalues i = 2/`quartiles'{
  2.         foreach genero in male female {
  3.                 gen Hispanic_dec`i'_`genero'=Hispanic*dec`i'*`genero'
  4.                 gen Black_dec`i'_`genero'=Black*dec`i'*`genero'
  5.                 gen Minority_dec`i'_`genero'=Minority*dec`i'*`genero'
  6.         }
  7. 
.         
. 
. }

. 
. 
. 
. 
. 
. 
. 
. *****************************************************************************
> *******************
. * Minority
. *****************************************************************************
> *******************
. 
. 
. 
. 
. 
. eststo: disc_boot choice Minority_dec2_female Minority_dec3_female Minority_d
> ec4_female ///
>                           Minority_dec2_male   Minority_dec3_male Minority_de
> c4_male ///
>                          , varlist(i.education_level i.order)
note: multiple positive outcomes within groups encountered.
note: 1,331 groups (3,993 obs) dropped because of all positive or
      all negative outcomes.

Iteration 0:   log pseudolikelihood =  -923.9095  
Iteration 1:   log pseudolikelihood = -913.86914  
Iteration 2:   log pseudolikelihood = -913.84144  
Iteration 3:   log pseudolikelihood = -913.84144  

Conditional (fixed-effects) logistic regression

                                                Number of obs     =      2,730
                                                Wald chi2(10)     =     179.35
                                                Prob > chi2       =     0.0000
Log pseudolikelihood = -913.84144               Pseudo R2         =     0.0859

                              (Std. Err. adjusted for 14 clusters in Zip_Code)
------------------------------------------------------------------------------
             |               Robust
      choice |      Coef.   Std. Err.      z    P>|z|     [90% Conf. Interval]
-------------+----------------------------------------------------------------
Min~2_female |  -.2390874   .1074714    -2.22   0.026    -.4158621   -.0623127
Min~3_female |  -.1384108   .1321071    -1.05   0.295    -.3557077    .0788861
Min~4_female |   .3124658   .1643081     1.90   0.057      .042203    .5827285
Minor~2_male |  -.7705534   .1831484    -4.21   0.000    -1.071806    -.469301
Minor~3_male |  -.5963852   .1816775    -3.28   0.001    -.8952181   -.2975522
Minor~4_male |  -.0292931   .1787992    -0.16   0.870    -.3233916    .2648054
             |
education_~l |
        low  |  -.1681211   .1197603    -1.40   0.160    -.3651092     .028867
     medium  |  -.3078154   .1392912    -2.21   0.027     -.536929   -.0787018
             |
       order |
          2  |  -.3374303   .2444226    -1.38   0.167    -.7394697    .0646091
          3  |  -.9123467   .2041696    -4.47   0.000    -1.248176   -.5765176
------------------------------------------------------------------------------
cluster(Zip_Code)Zip_Codecluster(Zip_Code)Zip_Codecluster(Zip_Code)Zip_Codeclus
> ter(Zip_Code)Zip_Codecluster(Zip_Code)Zip_Codecluster(Zip_Code)Zip_Code

Bootstrap Corrected Estimates
------------------------------------------------------------------------------
             |      Coef.   Std. Err.      t    P>|t|     [90% Conf. Interval]
-------------+----------------------------------------------------------------
Min~2_female |  -.2390874   .1130933    -2.11   0.054     -.439368   -.0388068
Min~3_female |  -.1384108   .1308855    -1.06   0.310    -.3702004    .0933788
Min~4_female |   .3124658   .1826174     1.71   0.111    -.0109375    .6358691
Minor~2_male |  -.7705534   .2213091    -3.48   0.004    -1.162477   -.3786296
Minor~3_male |  -.5963852   .1879336    -3.17   0.007    -.9292031   -.2635672
Minor~4_male |  -.0292931   .1775735    -0.16   0.872     -.343764    .2851778
------------------------------------------------------------------------------
(est1 stored)

. sum choice if White==1 

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
      choice |      2,241    .3944668    .4888449          0          1

. estadd scalar responsewhite = r(mean), replace 

added scalar:
      e(responsewhite) =  .39446676

. estadd local edu = "Yes", replace 

added macro:
                e(edu) : "Yes"

. estadd local order = "Yes", replace 

added macro:
              e(order) : "Yes"

. estimates store model1

. 
. 
. 
. 
. 
. 
. *****************************************************************************
> *******************
. * African American vs Hispanic/LatinX
. *****************************************************************************
> *******************
. 
. eststo: disc_boot choice Black_dec2_female Black_dec3_female  Black_dec4_fema
> le ///
>                           Black_dec2_male Black_dec3_male Black_dec4_male ///
>                           Hispanic_dec2_female Hispanic_dec3_female Hispanic_
> dec4_female ///
>                           Hispanic_dec2_male Hispanic_dec3_male Hispanic_dec4
> _male ///
>                          , varlist(i.education_level i.order)
note: multiple positive outcomes within groups encountered.
note: 1,331 groups (3,993 obs) dropped because of all positive or
      all negative outcomes.

Iteration 0:   log pseudolikelihood = -900.89505  
Iteration 1:   log pseudolikelihood = -889.79668  
Iteration 2:   log pseudolikelihood = -889.73281  
Iteration 3:   log pseudolikelihood = -889.73281  

Conditional (fixed-effects) logistic regression

                                                Number of obs     =      2,730
                                                Wald chi2(13)     =          .
                                                Prob > chi2       =          .
Log pseudolikelihood = -889.73281               Pseudo R2         =     0.1100

                              (Std. Err. adjusted for 14 clusters in Zip_Code)
------------------------------------------------------------------------------
             |               Robust
      choice |      Coef.   Std. Err.      z    P>|z|     [90% Conf. Interval]
-------------+----------------------------------------------------------------
Bla~2_female |  -.3560318   .1180458    -3.02   0.003       -.5502   -.1618637
Bla~3_female |  -.1783958   .1864495    -0.96   0.339     -.485078    .1282864
Bla~4_female |   .3214968   .2249294     1.43   0.153    -.0484791    .6914727
Black~2_male |   -1.27711   .2395315    -5.33   0.000    -1.671104   -.8831155
Black~3_male |  -1.064757   .2145722    -4.96   0.000    -1.417697    -.711817
Black~4_male |  -.3431364   .2144394    -1.60   0.110    -.6958578     .009585
His~2_female |  -.0895749     .15252    -0.59   0.557     -.340448    .1612981
His~3_female |  -.1001311   .1290426    -0.78   0.438    -.3123872     .112125
His~4_female |     .30492   .2184969     1.40   0.163    -.0544753    .6643153
Hispa~2_male |  -.3921957   .1892159    -2.07   0.038    -.7034281   -.0809633
Hispa~3_male |   -.048664   .1859442    -0.26   0.794     -.354515     .257187
Hispa~4_male |   .3060868   .2242305     1.37   0.172    -.0627396    .6749131
             |
education_~l |
        low  |  -.2053089   .1319568    -1.56   0.120    -.4223585    .0117408
     medium  |  -.3301116   .1300491    -2.54   0.011    -.5440233      -.1162
             |
       order |
          2  |  -.3133355   .2538934    -1.23   0.217     -.730953     .104282
          3  |  -.9179055    .214264    -4.28   0.000    -1.270338   -.5654726
------------------------------------------------------------------------------
cluster(Zip_Code)Zip_Codecluster(Zip_Code)Zip_Codecluster(Zip_Code)Zip_Codeclus
> ter(Zip_Code)Zip_Codecluster(Zip_Code)Zip_Codecluster(Zip_Code)Zip_Codecluste
> r(Zip_Code)Zip_Codecluster(Zip_Code)Zip_Codecluster(Zip_Code)Zip_Codecluster(
> Zip_Code)Zip_Codecluster(Zip_Code)Zip_Codecluster(Zip_Code)Zip_Code

Bootstrap Corrected Estimates
------------------------------------------------------------------------------
             |      Coef.   Std. Err.      t    P>|t|     [90% Conf. Interval]
-------------+----------------------------------------------------------------
Bla~2_female |  -.3560318   .1221059    -2.92   0.012    -.5722732   -.1397904
Bla~3_female |  -.1783958   .1787167    -1.00   0.336    -.4948912    .1380996
Bla~4_female |   .3214968   .2326733     1.38   0.190    -.0905521    .7335457
Black~2_male |   -1.27711   .2781396    -4.59   0.001    -1.769676   -.7845431
Black~3_male |  -1.064757   .2407151    -4.42   0.001    -1.491047   -.6384665
Black~4_male |  -.3431364   .2061131    -1.66   0.120     -.708149    .0218762
His~2_female |  -.0895749   .1539553    -0.58   0.571    -.3622196    .1830697
His~3_female |  -.1001311   .1309315    -0.76   0.458     -.332002    .1317399
His~4_female |     .30492   .2386115     1.28   0.224     -.117645     .727485
Hispa~2_male |  -.3921957   .1949279    -2.01   0.065    -.7374001   -.0469913
Hispa~3_male |   -.048664   .1872474    -0.26   0.799    -.3802668    .2829387
Hispa~4_male |   .3060868   .2329717     1.31   0.212    -.1064906    .7186641
------------------------------------------------------------------------------
(est2 stored)

. sum choice if White==1 

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
      choice |      2,241    .3944668    .4888449          0          1

. estadd scalar responsewhite = r(mean), replace 

added scalar:
      e(responsewhite) =  .39446676

. estadd local edu = "Yes", replace 

added macro:
                e(edu) : "Yes"

. estadd local order = "Yes", replace 

added macro:
              e(order) : "Yes"

. estimates store model2

. 
. 
. 
. 
. 
. *****************************************************************************
> *******************
. * Export to latex
. * based on http://www.eyalfrank.com/code-riffs-stata-and-regression-tables/
. *****************************************************************************
> *******************
. 
. 
. 
. #delimit ; 
delimiter now ;
. esttab model1
>           model2
>        using "../views/tableA12.tex",  
>        style(tex) 
>        eform
>        cells(b(star fmt(4)) ci(par fmt(4) par(( , )))  ) 
>        label 
>        stats(responsewhite 
>              edu 
>              order
>              N
>              listings
>              diff_response, fmt(2 0 0 %9.0gc %9.0gc 2)
>              labels(" Mean Response (White)"
>                         "\hline Education Level" 
>                    "Inquiry Order"
>                    "\hline Observations"
>                    "Listings"
>                    "\% w. diff. response"
>                    )) 
>        mlabels( ,none)  
>        nonumbers
>        collabels(,none) 
>        eqlabels(,none)
>        varlabels(Minority_dec2_female "Minority 0-25th perc. Toxic Concentrat
> ion $\times$ Female"
>                                 Minority_dec2_male      "Minority 0-25th perc
> . Toxic Concentration $\times$ Male"
>                                 Minority_dec3_female "Minority 25-75th perc. 
> Toxic Concentration $\times$ Female"
>                                 Minority_dec3_male      "Minority 25-75th per
> c. Toxic Concentration $\times$ Male"
>                                 Minority_dec4_female "Minority 75-100th perc.
>  Toxic Concentration $\times$ Female"
>                                 Minority_dec4_male      "Minority 75-100th pe
> rc. Toxic Concentration $\times$ Male"
>                                 Black_dec2_female "Af. American 0-25th perc. 
> Toxic Concentration $\times$ Female"
>                                 Black_dec2_male "Af. American 0-25th perc. To
> xic Concentration $\times$ Male"
>                                 Black_dec3_female "Af. American 25-75th perc.
>  Toxic Concentration $\times$ Female"
>                                 Black_dec3_male "Af. American 25-75th perc. T
> oxic Concentration $\times$ Male"
>                                 Black_dec4_female "Af. American 75-100th perc
> . Toxic Concentration $\times$ Female"
>                                 Black_dec4_male "Af. American 75-100th perc. 
> Toxic Concentration $\times$ Male"
>                                 Hispanic_dec2_female "Hispanic/LatinX 0-25th 
> perc. Toxic Concentration $\times$ Female"
>                                 Hispanic_dec2_male "Hispanic/LatinX 0-25th pe
> rc. Toxic Concentration $\times$ Male"
>                                 Hispanic_dec3_female "Hispanic/LatinX 25-75th
>  perc. Toxic Concentration $\times$ Female"
>                                 Hispanic_dec3_male "Hispanic/LatinX 25-75th p
> erc. Toxic Concentration $\times$ Male"
>                                 Hispanic_dec4_female "Hispanic/LatinX 75-100t
> h perc. Toxic Concentration $\times$ Female"
>                                 Hispanic_dec4_male "Hispanic/LatinX 75-100th 
> perc. Toxic Concentration $\times$ Male"
> ) 
>        starl(* 0.1 ** 0.05 *** 0.01)   
>        level(90) 
>        prehead(
> \begin{table}[H]
> \scriptsize \centering
> \begin{threeparttable}
> \captionsetup{justification=centering}
>   \caption{Estimates of Discriminatory Constraint on Housing Choice \\ Hetero
> geneity by Gender }
>   \label{tab:heterogeneitygender}
> 
> \begin{tabular}{@{\extracolsep{5pt}}lcc}
> \\[-1.8ex]\hline
> \hline \\[-1.8ex]
>  & \multicolumn{2}{c}{\textit{Dependent variable: {\it  Response}}} \\
>  \cline{2-3}
>  \\[-1.8ex] & (1) & (2)  \\
>        )
>        posthead(\hline) 
>        prefoot() 
>        postfoot(
> \hline
> \hline \\[-1.8ex]
> \end{tabular}
> \begin{tablenotes}[scriptsize,flushleft] \scriptsize
> \item Notes: 
> 
> \end{tablenotes}
> \end{threeparttable}
> \end{table}
>        )
>        replace;
(output written to ../views/tableA12.tex)

. #delimit cr
delimiter now cr
. 
. 
. 
. 
. *end
. 
. 
. *end
. 
. 
end of do-file
